
import { View, Image } from "@tarojs/components"
import { IconFont } from "../theme"

export const TShowCode = (props: { visible: boolean, url: string, closeModal: (boolean) => void }) => {

    const { visible, url, closeModal } = props

    if (!visible) {
        return <></>
    }
    return (
        <View className="fixed top-0 left-0 w-full h-full overflow-hidden bg-black bg-opacity-60 px-pageX pt-[300px]">
            <View className="flex items-center justify-end w-full mb-[50px] h-max" onClick={() => { closeModal(false) }}>
                <IconFont name='a-cross-circle11' color={'white'} size={40} />
            </View>
            <View className="w-full h-[700px] rounded-small bg-white inline-flex items-center justify-center">
                <Image src={url} className="w-[352px] h-[352px]" />
            </View>

        </View>
    )
}